<div>
    <?php $view->DropDownMenu()->operationControllers($view->em, $view->controller); ?>
    <a href="<?php
    echo $view->url(array('controller' => 'Vehicles',
        'action' => 'index'));
    ?>" class="btn btn-primary">
        Administrar vehículos
    </a>
</div>
<br/>
<?php if (count($view->vehicles) == 0): ?>
    <div class="alert alert-info">
        Aún no ha sido asignados vehículos a este controlador de operaciones (<?php echo $view->controller->getFullName(); ?>).
    </div>
<?php else: ?>
    <div class="panel panel-primary">
        <div class="panel-heading">Conductores asignados activos</div>
        <table class="table table-bordered table-condensed table-striped uppercase">
            <thead>
                <tr>
                    <th>Nombre</th>
                    <th>Asignado a</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($view->vehicles as $vehicle): ?>
                    <tr>
                        <td><?php echo $vehicle->getName(); ?></td>
                        <td><?php echo $vehicle->getDriver()->getFullNameWithType(); ?></td>
                    </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
    </div>
<?php endif; ?>
